import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { TestNameService } from './test-name.service';
import { CreateTestNameDto } from './dto/create-test-name.dto';
import { UpdateTestNameDto } from './dto/update-test-name.dto';

@Controller('test-name')
export class TestNameController {
  constructor(private readonly testNameService: TestNameService) {}

  @Post()
  create(@Body() createTestNameDto: CreateTestNameDto) {
    return this.testNameService.create(createTestNameDto);
  }

  @Get()
  findAll() {
    return this.testNameService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.testNameService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateTestNameDto: UpdateTestNameDto) {
    return this.testNameService.update(+id, updateTestNameDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.testNameService.remove(+id);
  }
}
